The present invention relates to a paint-out system capable of painting out the inner part of a figure at higher speed in an image supply unit such as a printer.
One type of printer includes an image supply unit which depicts an image of characters and figures of one page in a bit map memory, and supplies the image to a printing unit. A laser printer may be typically enumerated for this type of printer.
FIG. 13 is a block diagram showing a laser printer with such an image supply unit. In FIG. 13, reference numeral 1 designates a laser printer; 2, a panel; 3, a host computer terminal; 4, a LAN terminal; 5, a power source terminal; 6, an image supply unit; 7, a printing unit; 8, a power source circuit; 9, a print media; and 10 to 14, signal lines.
A host computer (not shown), connected to the host computer terminal 3, transmits print data through the signal line 10 to the image supply unit 6. The laser printer 1 may be connected to a LAN (local area network), not the host computer. In this case, the print data is applied through the LAN terminal 4 to the image supply unit 6.
An operator may enter various instructions to the laser printer 1 from the panel 2. These instructions are instructions of enlargement and reduction, for example. Instructions and responses thereto between the panel 2 and the image supply unit 6 are transferred through the signal line 11.
Image data of one page formed by the image supply unit 6, which will subsequently be described in detail, is transferred through the signal line 12 to the printing unit 7. In the printing unit 7, a laser beam is modulated in accordance with the content of an image signal output from the image supply unit 6. The modulated image beam is scanned across a photoreceptor drum, to form a latent image thereon.
During the operation of the printing unit 7, various signals are transferred between the printing unit 7 and the image supply unit 6, through the signal lines 13 and 14. Those signals are, for example, a synchronizing pulse signal transferred from the printing unit 7 to the image supply unit 6, and an operation command signal transferred from the image supply unit 6 to the printing unit 7.
Finally, the latent image on the photoreceptor is transferred to the print media 9, to complete the printing operation.
FIG. 14 is a block diagram showing the image supply unit 6. In FIG. 14, reference numeral 20 designates a host I/F (interface); 21, a panel I/F; 22, a CPU bus; 23, a bit map memory; 24, a bit map controller; 25, a printing unit I/F; 26, a CPU (central processing unit); 27, a PTC (programmable timer counter); 28, a RAM (random access memory); 29, a program memory; 30, a character pattern memory; 31, a removable memory unit having a program memory 31-1 and a character pattern memory 31-2.
The program memory 29 stores a program for operating the CPU 26. The character pattern memory 30 stores font data.
The removable memory set 31 including the program memory 31-1 and the character pattern memory 31-2 is used when the capacity of the program memory 29 or the character pattern memory 30 are short of the memory capacity.
The RAM 28, providing a memory area for work, stores various types of data necessary for the operation of the CPU 26 and the data receiving through the host I/F 20 and the panel I/F 21.
The bit map memory 23 provides a memory area where print image is developed in the form of a bit map. Usually, a bit map memory having a capacity for one page is used to constitute the print image of one page therein.
The PTC 27 is used for counting time and generating timing pulses, for example.
In forming an image in the bit map memory 23, the inner part of a graphic line is sometimes painted out. The paint-out rules are, for example, an odd/even rule and a non-zero winding number rule.
FIG. 9 is an explanatory diagram for explaining the odd/even rule. In the figure, C1 and C2 are circles; S, a scan line; and K, L, M, and N, intersections of the circles C1 and C2 and the scan line S. Curvilinear lines of the circles C1 and C2 are called graphic lines.
The odd/even rule is a rule in which of the segments formed when the scan line S intersects the graphic lines, the odd-numbered segments are painted out, but the even-numbered segments are not painted out. In this instance, the segment KL as the first segment and the segment MN as the third segment are painted out (shaded portions). If the scan line is traced from top to bottom, the accumulated area between the circles C1 and C2 is painted out.
The non-zero winding number rule will be described. The vector values in the non-zero winding number rule will be described with reference to FIG. 10. F indicates a part of the graphic line. In this rule, the direction of drawing a graphic line is also considered. A vector value "-1" is assigned to the graphic line F downwardly crossing the scan line S, as shown in FIG. 10A. Contrary, a vector value "+1" is assigned to the graphic line upwardly crossing the scan line as shown in FIG. 10B.
FIGS. 11A and 11B are explanatory diagrams for explaining how to paint out a figure according to the non-zero winding number rule. In this rule, the vector value is successively added every intersection in the direction of tracing the scan line S. The segment of which the sum of the vector values is not zero, i.e., non-zero, is painted out.
In FIG. 11A, it is assumed that the graphic line of the circle C1 is drawn counterclockwise, while that of the circle C2, clockwise. The vector values at the intersections K to L of the graphic lines of the circles and the scan line S are as shown in the figure. With the initial value of the vector value being 0, the vector values are added in the direction in which the scan line S travels forward. Then, the vector values at the intersections are as follows:
Intersection K . . . 0+(-1)=-1 (non-zero) PA1 Intersection L . . . -1+(+1)=0 PA1 Intersection M . . . 0+(-1)=-1 (non-zero) PA1 Intersection N . . . -1+(+1)=0
According to the non-zero winding number rule, the non-zero segments between the intersections K and L and between the intersections M and N are painted out.
FIG. 11B is an explanatory diagram used for the same purposes, but the direction of drawing the graphic line C2 is reverse to that in FIG. 11A. In this instance, the segments between the intersections K and N have all the vector values of non-zero. Therefore, those segments are painted out.
FIG. 12 is an explanatory diagram showing how to paint out an image of one page by the conventional paint-out method. In the figure, capital letters A, B, C, D, and E indicate vertexes of a figure; P, Q, R, S, and T, intersections of graphic lines; S.sub.0 to S.sub.6, scan lines; and X and Y, the coordinate axes. Where only the coordinates of the vertexes A to E are given, and those are connected by lines consecutively, a figure is formed as shown. The scan line is vertically traced from top to bottom in successive order. The intersections of the scan lines and the graphic lines are obtained every scan line, and are arranged (sorted) in order from the smallest X coordinate value. Each rectilinear line through which the scan line passes are divided into segments by the intersections. Those segments are selectively painted out using the odd/even rule or the non-zero winding number rule.
In the conventional paint-out method, the intersections of each scan line and the graphic lines must be sorted referring to the X-coordinate values thereof. The sorting work consumes much time, impairing the processing speed.